package cn.ywang.current.five;

/**
 * @author BeatificWang
 * @date 2019/7/31 21:12
 */
public class BlockingQueueDemo {
	public static void main(String[] args) throws InterruptedException {
		BlockingQueue<Integer> queue = new BlockingQueue<>(2);
		queue.put(1);
		System.out.println("success");
		queue.put(2);
		System.out.println("success");
		queue.take();
		System.out.println("success");
		queue.put(1);
		System.out.println("success");
	}
}
